/**
 * @author Fang Lu, fanglupku@gmail.com
 * 2011-5-12
 */
package com.autotag.entity;

public class TagEntity implements Comparable<TagEntity>{
	private String name;
	private int level;
	private double weight;
	public TagEntity(){
		
	}
	public TagEntity(String name, 
			int level, double weight){
		this.name = name;
		this.level = level;
		this.weight = weight;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public double getWeight() {
		return weight;
	}
	public void setWeight(double weight) {
		this.weight = weight;
	}
	/**
	 * according to weight
	 */
	public int compareTo(TagEntity o) {
		
		if (this.weight > o.weight){
			return -1;
		}else if (this.weight == o.weight){
			return 0;
		}else{
			return 1;
		}
		
	}
	
}
